import 'package:flutter/material.dart';

import 'package:get/get.dart';
import 'package:getx_learn/app/common/widgets/widgets.dart';
import 'package:getx_learn/app/modules/state_manager_demo/modules/dependency_injection/modules/get_lazy_put_page1/controllers/get_lazy_put_page1_controller.dart';

import '../controllers/get_lazy_put_page2_controller.dart';

class GetLazyPutPage2View extends GetView<GetLazyPutPage1Controller> {
  const GetLazyPutPage2View({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: getAppBar(context: context, title: "GetLazyPutPage2View"),
      body:Center(
        child: Column(
          children: [
            Obx(() => Text('value -> ${controller.count}')),
            Divider(),

            // 按钮
            ElevatedButton(
              onPressed: () {
                controller.increment();
              },
              child: Text('add'),
            ),
          ],
        ),
      ),
    );
  }
}
